import axios from 'axios';
import {adminApiPath} from "./adminApiPath";

const baseUrl = adminApiPath.admin.tag;

export const addTag = async (data: any) => {
    const res = await axios.post(baseUrl.add, data);
    return res.data;
};

export const getTagPageList = async (data: any) => {
    const res = await axios.post(baseUrl.list, data);
    return res.data;
};

export const deleteTag = async (tagId: number) => {
    const res = await axios.post(baseUrl.delete, {tagId});
    return res.data;
};

export const queryTags = async (key: any) => {
    const res = await axios.post(baseUrl.query, {key});
    return res.data;
}

export const getTagSelection = async () => {
    const res = await axios.post(baseUrl.selection);
    return res.data;
};
